﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/UI/SiteUI.Master" AutoEventWireup="true" CodeBehind="BusinessCodes.aspx.cs" Inherits="WebUI.Form.BusinessCodes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
               <script>
                   $(function () {
                       $("#bannertable tr td:eq(5)").css("background-color", "#DA4453").css("color", "white");
                   });
    </script>
     
    <%--<script src="../Scripts/jquery.waterfall/js/jquery-1.7.2.min.js"></script>--%>
    <link href="../Css/bcode.css" rel="stylesheet" />
    <link href="../Scripts/noUiSlider/nouislider.min.css" rel="stylesheet" />
    <script src="../Scripts/noUiSlider/nouislider.min.js"></script>
    <%--<script src="../Scripts/jquery.waterfall/js/jquery.waterfall.js"></script>--%>
 
    <script>
        $(function () {
            




            var slider = document.getElementById('slider');

            noUiSlider.create(slider, {
                start: [0, 1000],
                connect: true,
                tooltips: true,
                range: {
                    'min': 0,
                    'max': 1000
                },
                step:20
            });
            slider.noUiSlider.on('update', function (values, handle) {

                if (getQueryStringByName("max") != undefined) {
                    $('#ifppl').attr('src', changeURLPar($('#ifppl').attr('src'),"max",values[1]));
                }
                if (getQueryStringByName("min") != undefined) {
                    $('#ifppl').attr('src', changeURLPar($('#ifppl').attr('src'), "min", values[0]));
                }
                else{                $('#ifppl').attr('src', $('#ifppl').attr('src') + "&min=" + values[0] + "&max=" + values[1]);}

               console.log($('#ifppl').attr('src'));
            });
           
        });
    </script>
  <script type="text/javascript">
      function getQueryStringByName(name) {

          var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));

          if (result == null || result.length < 1) {

              return "";

          }

          return result[1];

      }

      function changeURLPar(url, ref, value) {
          var str = "";
          if (url.indexOf('?') != -1)
              str = url.substr(url.indexOf('?') + 1);
          else
              return url + "?" + ref + "=" + value;
          var returnurl = "";
          var setparam = "";
          var arr;
          var modify = "0";
          if (str.indexOf('&') != -1) {
              arr = str.split('&');
              for (i in arr) {
                  if (arr[i].split('=')[0] == ref) {
                      setparam = value;
                      modify = "1";
                  }
                  else {
                      setparam = arr[i].split('=')[1];
                  }
                  returnurl = returnurl + arr[i].split('=')[0] + "=" + setparam + "&";
              }
              returnurl = returnurl.substr(0, returnurl.length - 1);
              if (modify == "0")
                  if (returnurl == str)
                      returnurl = returnurl + "&" + ref + "=" + value;
          }
          else {
              if (str.indexOf('=') != -1) {
                  arr = str.split('=');
                  if (arr[0] == ref) {
                      setparam = value;
                      modify = "1";
                  }
                  else {
                      setparam = arr[1];
                  }
                  returnurl = arr[0] + "=" + setparam;
                  if (modify == "0")
                      if (returnurl == str)
                          returnurl = returnurl + "&" + ref + "=" + value;
              }
              else
                  returnurl = ref + "=" + value;
          }
          return url.substr(0, url.indexOf('?')) + "?" + returnurl;
      }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
       <div id="topNav">当前位置：首页 > 精品源码<span  class=""></span></div>
  
    <div id="content">
        <div id="topad">
        ad

    </div>
        <div class="alert alert-danger" style="height:40px">
              <strong ><span id="btnOrderByTime" style="cursor:pointer" class="badge badge-primary  ">更新时间↓</span></strong>  


            <script>
                $('#btnOrderByTime').click(function () {
                    //slider.noUiSlider.trigger("change");;
                    if ($('#btnOrderByTime').html() == "更新时间↓") {
                        $('#ifppl').attr('src', 'testppl.aspx?op=addtime&sort=asc&max=' + $('.noUi-tooltip').eq(1).html() + "&min=" + $('.noUi-tooltip').eq(0).html());
                    $('#btnOrderByTime').html('更新时间↑');
                    }
                    else {
                        $('#ifppl').attr('src', 'testppl.aspx?op=addtime&sort=desc&max=' + $('.noUi-tooltip').eq(1).html() + "&min=" + $('.noUi-tooltip').eq(0).html());
                        $('#btnOrderByTime').html('更新时间↓');
                    }
                    
                  //  alert($('#ifppl').attr('src'));
                });

            </script>
               <strong><span  id="btnOrderBySn" style="cursor:pointer"  class="badge badge-info  ">出售价格↓</span></strong>  

            <script>
                $('#btnOrderBySn').click(function () {
                    //slider.noUiSlider.trigger("update");;
                    if ($('#btnOrderBySn').html() == "出售价格↓") {
                        $('#ifppl').attr('src', 'testppl.aspx?op=salenum&sort=asc&max=' + $('.noUi-tooltip').eq(1).html() + "&min=" + $('.noUi-tooltip').eq(0).html());
                        $('#btnOrderBySn').html('出售价格↑');
                    }
                    else {
                        $('#ifppl').attr('src', 'testppl.aspx?op=salenum&sort=desc&max=' + $('.noUi-tooltip').eq(1).html() + "&min=" + $('.noUi-tooltip').eq(0).html());
                        $('#btnOrderBySn').html('出售价格↓');
                    }

                    //  alert($('#ifppl').attr('src'));
                });

            </script>

      <span style="float:right;color:white"> (tip:价格区间 /元)</span>  <div id="slider" style="float:right;width:500px">  </div>


      
            </div>
   
           <iframe src="testppl.aspx" id="ifppl" frameborder=0  style="width:100%;height:100%"   scrolling=no></iframe>
     
  
 
        </div>

    



    
</asp:Content>
